﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>InSTEDD Geocoding Sample</title>
    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAOlNHflq04bxj4SE5QyxJ-hTHnj9vwfySGyma0rS4VaPF4rdAJxQvKwU8zMBO2oAIOe1atke0m9pYUg"
      type="text/javascript"></script>
    </script>
  </head>
  <body onload="load()" onunload="GUnload()">
  <h1>InSTEDD Geocoding Sample</h1>
    Address: <input id="postalAddress" type="text" onblur="PostalAddress2LatLong();" />
    <br /><br />
    Lat: <input id="edLat" type="text" readonly="true" />
    Long: <input id="edLong" type="text" readonly="true" />
    
    <br /><br /><br />Como lo ves andando esto con el client offline? :s
    <script language="javascript" type="text/javascript">
    function LatLongCallback(point)
    {
        edLat.value = point.x;
        edLong.value = point.y;
    }
    
    function PostalAddress2LatLong()
    {
        var elem = document.getElementById('postalAddress');
        postalAddressValue = elem.value;
        var geocoder = new GClientGeocoder();
        geocoder.getLatLng(postalAddressValue, LatLongCallback);
    }
    </script>
  </body>
</html>